package com.seaboxdata.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seaboxdata.dao.DataRealInfoDao;
import com.seaboxdata.entity.DataRealInfo;
import com.seaboxdata.service.DataRealInfoService;
import com.seaboxdata.service.HiveDataInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * @author lh
 * @create 2021-09-19 11:08
 **/
@Service("dataRealInfoService")
public class DataRealInfoServiceImpl extends ServiceImpl<DataRealInfoDao, DataRealInfo> implements DataRealInfoService {

    @Autowired
    private DataRealInfoDao dataRealInfoDao;

    @Autowired
    private HiveDataInfoService hiveDataInfoService;

    @Override
    public Long getStaRealInfo() {
        long realSum = dataRealInfoDao.getRealSum();
        long staSum = hiveDataInfoService.getTotalCount(new Date());
         return realSum+staSum;
    }

}
